package com.yuncheng.spcyApi.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuncheng.spcyApi.entity.SpcySqsxYbmjbxx;
import com.yuncheng.spcyApi.entity.SpcySqsxYbmjh;
import com.yuncheng.spcyApi.entity.SpcySqsxYbmjl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuncheng.spcyApi.vo.spcy.MyYbmListVo;
import com.yuncheng.spcyApi.vo.sqsx.SqsxYbmjbxxVo;
import com.yuncheng.spcyApi.vo.sqsx.YbmHcyListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 审评查验-预报名记录
 * @Author: csx
 * @Date: 2023-03-03
 * @Version: V1.0
 */
public interface SpcySqsxYbmjlMapper extends BaseMapper<SpcySqsxYbmjl> {

    /** 查询报名人员信息列表 */
    List<YbmHcyListVo> getYbmHcyList(@Param("bean") YbmHcyListVo bean);

    /** 查询当前人员可报名计划-分页查询 */
    Page<MyYbmListVo> getYbmJhPageList(Page<MyYbmListVo> page,
                                       @Param("bean") MyYbmListVo bean,
                                       @Param("kssjStart")String kssjStart,
                                       @Param("kssjEnd")String kssjEnd,
                                       @Param("jssjStart")String jssjStart,
                                       @Param("jssjEnd")String jssjEnd,
                                       @Param("nowDate")String nowDate,
                                       @Param("nowUserId")String nowUserId);

    /** 根据报名基本信息id-查询所有相关的报名计划记录 */
    List<SpcySqsxYbmjh> getYbmjhByYbmjbxxid(@Param("fbmjbxxid") String fbmjbxxid);

    /** 分页查询预报名基本信息-及以下的报名计划记录 */
    Page<SqsxYbmjbxxVo> getYbmjbxxJBmjhPageList(Page<SqsxYbmjbxxVo> page, @Param("bean")SpcySqsxYbmjbxx bean);

    /**
     * 更新报名计划明细-根据报名截止时间设置为已结束
     * @param nowDate 当前日期
     * @param fbmzt 查询报名状态
     * @param updateBmzt 更新报名状态
     */
    void updateYbmjhByFbmjsrq(@Param("nowDate") String nowDate, @Param("fbmzt") String fbmzt, @Param("updateBmzt") String updateBmzt);

}
